package cn.com.processor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import cn.com.api.service.StartOnLoadService;

public class ManagerPostProcessor implements BeanPostProcessor {

	@Override
	public Object postProcessAfterInitialization(Object obj, String arg1)
			throws BeansException {
		if (obj instanceof StartOnLoadService) {
			((StartOnLoadService) obj).loadData();
		}
		return obj;
	}

	@Override
	public Object postProcessBeforeInitialization(Object arg0, String arg1)
			throws BeansException {
		return arg0;
	}

}
